package internal

import "sync"

var taskFuncMap sync.Map

func PutTaskFunc(taskFullName string, taskFunc func() error) {
    taskFuncMap.Store(taskFullName, taskFunc)
}

func GetTaskFunc(taskFullName string) func() error {
    val, ok := taskFuncMap.Load(taskFullName)
    if ok {
        return val.(func() error)
    } else {
        return nil
    }
}
